package Connect;

use DBI;
use strict;

sub db_con
{
my ($db,$user,$pw)=@_;
my $dbh = DBI->connect("DBI:mysql:database=$db;host=localhost","$user","$pw",{'RaiseError' => 0});
return ($dbh);
}


sub db_discon
{
my $dbh = shift @_;

my $result=$dbh->disconnect();

if ($result eq "0")
{
	return "no";
}
else
{
	return "yes";
}
}

1;
